﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using HiStaff.Domain.PA;
using HiStaff.Dal;
using HiStaff.Domain.LST;
using HiStaff.Domain.HU;

namespace HiStaff.Service
{
    public class Payroll : IPayroll
    {
        public List<PA_SIGN_LST> GetAllSignList()
        {
            return OracleHelper.ExcuteSelectMultiObject<PA_SIGN_LST>("APRS_PA_SIGN_LST");
        }
        public List<PA_FML_DTL> GetFormularDetail(decimal? fmlID)
        {
            return OracleHelper.ExcuteSelectMultiObject<PA_FML_DTL>("APRS_PA_FML_DTL", new PA_FML_DTL { FMLID = fmlID });
        }
        public List<LST_SALPERIOD> GetSalaryPeriod(decimal? year, decimal? status)
        {
            return OracleHelper.ExcuteSelectMultiObject<LST_SALPERIOD>("APRS_LST_SALPERIOD", new LST_SALPERIOD { YEAR = year, STATUS = status});
        }
        public List<PA_FML> GetFormular()
        {
            return OracleHelper.ExcuteSelectMultiObject<PA_FML>("APRS_PA_FML");
        }
        public List<LST_SALPERIOD> GetActiveSalaryPeriod(decimal? year, decimal? orgId)
        {
            return OracleHelper.ExcuteSelectMultiObject<LST_SALPERIOD>("PRS_ACTIVESALPERIOD", new PA_ORG_SALPERIOD { ORGID = orgId, YEAR = year });
        }
        public List<HU_EMPLOYEE> GetEmployeeByPeriod(PA_SUM_SEARCH parameter)
        {
            return OracleHelper.ExcuteSelectMultiObject<HU_EMPLOYEE>("PRS_EMPLOYEBYPERIOD", parameter);
        }
    }
}
